<?php

namespace service;

use wechat\WechatService;

class SeparateJobService
{
    private WechatService $wechat;

    public function __construct($data,$secret)
    {
        $this->wechat = new WechatService($data['sub_mch_id'],$secret);
    }
    public function bind_user($data){
       $res = $this->wechat->addReceiverOpenid(['open_id' => $data['openid']]);
       if ($res['return_code'] == $res['result_code'] && $res['result_code'] == "SUCCESS")
        echo 123;
    }
}